package file;

import java.io.File;
import java.io.IOException;

/**
 * @description: TODO
 * @author yumo
 * @version: 1.0
 * @date 2025/3/14 10:42
 */
public class CreateNewFileDemo {
    public static void main(String[] args) throws IOException {
        File file=new File("./test.txt");
        if (file.exists()){
            System.out.println("文件已存在！");
        }else {
            file.createNewFile();
            System.out.println("文件已创建！");
        }
    }
}
